{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "766ae5ce",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "小狗汪汪\n"
     ]
    }
   ],
   "source": [
    "class Animal():\n",
    "    def __init__(self,name):\n",
    "        self.name=name\n",
    "    def speak(self):\n",
    "        pass\n",
    "class Dog(Animal):\n",
    "    def __init(self,name):\n",
    "        super().__init__(name)\n",
    "    def speak(self):\n",
    "        print(f\"{self.name}汪汪\")\n",
    "a=Dog(\"小狗\")\n",
    "a.speak()\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "cv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
